package com.liu.io;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.StaxDriver;

/**
 * 字节流
 * 
 * @author ydxx
 *
 */
public class ByteIO {
	public static void main(String[] args) throws FileNotFoundException {
		String inFilePath = "C:\\Users\\12961\\Desktop\\new\\aa.txt";
		String outFilePath = "C:\\Users\\12961\\Desktop\\new\\bb.txt";
		FileUtil fileUtil = new FileUtil();
		FileInputStream fileInStream = new FileInputStream(fileUtil.initFile(inFilePath));
		
		FileOutputStream fileOutStream = new FileOutputStream(fileUtil.initFile(outFilePath));
		
		
		// Java对象序列化到XML。将Java对象和xml文档相互转换
		XStream x = new XStream(new StaxDriver());
		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("")));
	}

	/**
	 * 字节输入流
	 */
	public void inputSteam() {
		InputStream in = new InputStream() {
			@Override
			public int read() throws IOException {
				// TODO Auto-generated method stub
				return 0;
			}
		};
	}

	/**
	 * 输出流
	 */
	public void outputSteam() {
		OutputStream out = new OutputStream() {
			@Override
			public void write(int b) throws IOException {
				// TODO Auto-generated method stub
				
			}
		};
	}
}
